/*
 * @Author: 徐博
 * @Date: 2023-02-16 17:29:52
 * @Last Modified by: 徐博
 * @Last Modified time: 2023-03-08 10:55:11
 */

import http from '@/plugins/index'
import { UserInfo, ResponseUserList } from '@/type/user-type';

export interface LoginParams {
    mobile?: string;
    password: string;
    username?:string;
}

export default {
    async login(params: LoginParams) {
        return await http.post<UserInfo>('/api/user/login',params)
    },
    async getUserList(params: any) {
        return await http.post<ResponseUserList[]>('/api/user/userList',params)
    },
    async downloadFileApi(params: any) {
        return await http.post<ResponseUserList[]>('/api/user/userList',params, {responseType: 'blob'})
    },


}
